//-------------------------------------------------------------
// Classe permettant la tesselation
//
// voir: http://www.flipcode.com/tutorials/tut_tesselation.shtml
//-------------------------------------------------------------



#ifndef _TESS_POLY_H_
#define _TESS_POLY_H_

#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>

#define RENDU_BASIC 1
#define RENDU_COMBINE 2

class Tess_Poly {
	private:
		GLUtesselator *tobj;					// the tessellation object
	public:
		int Init(GLint type_de_rendu);			// type_de_rendu = RENDU_BASIC (ie, on travaille uniquement avec les vertex) ou RENDU_COMBINE(ie  vertex + couloeur ds le meme tab)
		int Set_Winding_Rule(GLenum winding_rule);
		int Render_Contour(GLdouble obj_data[][6], int num_vertices);
		int Begin_Polygon(GLvoid);
		int End_Polygon(GLvoid);
		int Begin_Contour(GLvoid);
		int End_Contour(GLvoid);
		int End(GLvoid);
};


#endif